function lTrim(s) {
	return s.replace(/^\s*/, '');
	// ^ ... ���ڿ�����
	// \s ... ���
	// * ... ���ϵ�ī�� 0~n
	// $ ... ���ڿ� ������
}

/*function Keyword(){
	this.
	var result = false;
	for(var i = 0; i < array.length; i++){
		if(key == array[i]){
			result = true;
		}
	}
	return result;
}*/

function getStyle(element, style){ 
    if(element.currentStyle) return element.currentStyle.getAttribute(style); // IE 
    else{ 
        var css = document.defaultView.getComputedStyle(element, null); 
        return css.getPropertyValue(style); 
    } 
} 

function getSequence(el) {
	var parent = el.parentNode;
	var sequence = 0;
	while (parent.firstChild != el) {
		el = el.previousSibling;
		sequence++;
	}
	return sequence;
}

function getSequence02(el) {
	var parent = el.parentNode;
	var sequence = 0;
	while (parent.firstChild != el) {
		el = el.previousSibling;
		sequence++;
	}
	return sequence;
}

function include(filename) {
	var head = document.getElementsByTagName('head')[0];

	script = document.createElement('script');
	script.src = filename;
	script.type = 'text/javascript';

	head.appendChild(script);
}

function include2(destination) {
	var e = window.document.createElement('script');
	e.setAttribute('src', destination);
	window.document.body.appendChild(e);
}

function changeStyle(theClass, element, value) {
	var cssRules;

	var added = false;
	for ( var S = 0; S < document.styleSheets.length; S++) {
		if (document.styleSheets[S]['rules']) {
			cssRules = 'rules';
		} else if (document.styleSheets[S]['cssRules']) {
			cssRules = 'cssRules';
		} else {
			// no rules found... browser unknown
		}

		for ( var R = 0; R < document.styleSheets[S][cssRules].length; R++) {
			if (document.styleSheets[S][cssRules][R].selectorText == theClass) {
				if (document.styleSheets[S][cssRules][R].style[element]) {
					document.styleSheets[S][cssRules][R].style[element] = value;
					added = true;
					break;
				}
			}
		}
		if (!added) {
			if (document.styleSheets[S].insertRule) {
				document.styleSheets[S].insertRule(theClass + ' { ' + element + ': ' + value + '; }',
						document.styleSheets[S][cssRules].length);
			} else if (document.styleSheets[S].addRule) {
				document.styleSheets[S].addRule(theClass, element + ': ' + value + ';');
			}
		}
	}
}